<html  xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>财富管家X-管理员</title>
  <meta name="renderer" content="webkit|ie-comp|ie-stand">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="shortcut icon" th:href="@{images/littlelogo.png}" >
  <link rel="icon" th:href="@{/favicon.ico}"  mce_href="/favicon.ico" type="image/x-icon"/>
  <link rel="stylesheet" th:href="@{/css/font.css}">
  <link rel="stylesheet" th:href="@{/css/xadmin.css}">
  <script type="text/javascript" th:src="@{/js/jquery-3.2.1.min.js}"></script>
  <script th:src="@{/lib/layui/layui.js}" charset="utf-8"></script>
  <script type="text/javascript" th:src="@{/js/xadmin.js}"></script>

  <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
  <!--[if lt IE 9]>
  <script th:src="@{/js/html5.min.js}" type="text/javascript"></script>
  <script th:src="@{/js/respond.min.js}" type="text/javascript"></script>
  <![endif]-->
</head>

<body>
<div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="">首页</a>
        <a>
          <cite>已完成项目</cite></a>
      </span>
  <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
    <i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div class="x-body">
  <!-- <div class="layui-row">
     <form class="layui-form layui-col-md12 x-so">
       <input class="layui-input" placeholder="开始日" name="start" id="start">
       <input class="layui-input" placeholder="截止日" name="end" id="end">
       <div class="layui-input-inline">
         <select name="contrller">
           <option>支付状态</option>
           <option>已支付</option>
           <option>未支付</option>
         </select>
       </div>
       <div class="layui-input-inline">
         <select name="contrller">
           <option>支付方式</option>
           <option>支付宝</option>
           <option>微信</option>
           <option>货到付款</option>
         </select>
       </div>
       <div class="layui-input-inline">
         <select name="contrller">
           <option value="">订单状态</option>
           <option value="0">待确认</option>
           <option value="1">已确认</option>
           <option value="2">已收货</option>
           <option value="3">已取消</option>
           <option value="4">已完成</option>
           <option value="5">已作废</option>
         </select>
       </div>
       <input type="text" name="username"  placeholder="请输入订单号" autocomplete="off" class="layui-input">
       <button class="layui-btn"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
     </form>
   </div>-->
  <xblock>
    <!--  <button class="layui-btn layui-btn-danger" onclick="delAll()"><i class="layui-icon"></i>批量删除</button>
      <button class="layui-btn" onclick="x_admin_show('添加用户','./order-add.html')"><i class="layui-icon"></i>添加</button>-->
    <span class="x-right" style="line-height:40px" th:text="'共有数据：'+${num}+'条'">共有数据：88 条</span>
  </xblock>
  <table class="layui-table">
    <thead>
    <tr>
      <!--<th>
        <div class="layui-unselect header layui-form-checkbox" lay-skin="primary"><i class="layui-icon">&#xe605;</i></div>
      </th>-->
      <th>项目编号</th>
      <th>项目名称</th>
      <th>项目发起人</th>
      <th>项目类型</th>
      <th>用户额度</th>
      <th>项目金额</th>
      <th>项目回报率</th>
      <th>项目月还款</th>
      <th>项目期数</th>
      <th>项目扣款日</th>
      <th>已还款</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="completion:${completions}">
      <!--<td>
        <div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id='2'><i class="layui-icon">&#xe605;</i></div>
      </td>-->
      <td th:text="'201800'+${completion.id}">201811080001</td>
      <td th:text="'抵押贷-'+${completion.projectname}">车易贷-180918H01-孙先生车辆抵押贷</td>
      <td th:text="${completion.username}">孙先生</td>
      <td>抵押贷</td>
      <td th:text="${completion.usermoney}">150000.0</td>
      <td th:text="${completion.projectmoney}">100000.0</td>
      <td th:text="${completion.projectrateofreturn}+'%'">10.0%</td>
      <td th:text="${completion.projectmonthlyreturn}">833.0</td>
      <td th:text="${completion.projectborrowtime}">10期</td>
      <td>15日</td>
      <td th:text="已完成">15日</td>
      <!--<td class="td-manage">
        <a title="查看"  onclick="x_admin_show('编辑','order-view.html')" href="javascript:;">
          <i class="layui-icon">&#xe63c;</i>
        </a>
        <a title="完成" onclick="member_del(this,'已经完成的项目')" href="javascript:;">
          <i class="layui-icon">&#xe640;</i>
        </a>
      </td>-->
    </tr>
    </tbody>
  </table>
</div>
<div id="pagination" style="text-align: center"></div>
</body>
<script th:inline="javascript">

    var contextPath = [[${#request.getContextPath()}]]; //获取当前应用路径
    var count = [[${count}]];
    var curr = [[${curr}]];//当前页

</script>
<script type="text/javascript">
    //使用layui分页
    layui.use('laypage', function(){
        var laypage = layui.laypage;
        //执行一个laypage实例
        laypage.render({
            elem: 'pagination' //注意，这里的 data 是 ID，不用加 # 号
            ,count: count  //数据总数，从服务端得到
            ,curr: curr
            // , layout: ['count', 'prev', 'page', 'next', 'limit', 'refresh', 'skip']
            ,limit: 10
            ,jump: function(obj, first){
                //obj包含了当前分页的所有参数，比如：
                // console.log(obj.curr); //得到当前页，以便向服务端请求对应页的数据。
                // console.log(obj.limit); //得到每页显示的条数

                //首次不执行
                if(!first){
                    window.location.href = contextPath + "/home/project_Repayments?page=" + (obj.curr) + "&size=" + obj.limit
                    //   pagination(obj.curr, obj.limit);//第二个参数不能用变量pageSize，因为当切换每页大小的时候会出问题
                }
            }
        });
    });
</script>

</html>